var express = require('express');
var router = express.Router();

router.post('/list', function (req, res, next) {
  const { offset, size } = req.body;
  const users = [];

  for (let i = offset; i < offset + size; i++) {
    users.push({
      id: i + 1,
      name: `user${i + 1}`,
      intra: `所有权限${i + 1}`,
      createAt: new Date().toISOString(),
      updateAt: new Date().toISOString(),
    });
  }
  res.send({ code: 0, data: { list: users, total: users.length } });
});
module.exports = router;
